import com from './com.js'
export default {
	scan(cbfunc,failcbfunc){
		uni.scanCode({
			success(info){
				if(com.isbool(info.result) && com.isbool(info.errMsg) && info.errMsg == "scanCode:ok" ){
					cbfunc(info.result)
				}else{
					com.showToast("扫码错误")
				}
			},
			fail(info){
				failcbfunc(info)
			}
		})
	}
} 
